﻿@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <title>Index</title>

    <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/checkinput.js",true)" type="text/javascript"></script>

    <link href="@Url.Content("~/Content/login.css",true)" rel="stylesheet" type="text/css" />
    @if (false)
    {
        <script src="../../../../Scripts/jquery-1.5.1-vsdoc.js" type="text/javascript"></script>
    }

    <script type="text/javascript">
        $(document).ready(function () {
            var hdjsAlert = $("#hdjsAlert").val();
            if (hdjsAlert != "") {
                alert(hdjsAlert);
            }
        });
    </script>

    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            $("#txtUserName").focus();
            $("#imgValiCode").bind("click", function () {
                $(this).attr("src", "../Admin/Login/GetValidateCode?time=" + (new Date()).getTime());
            });
            $("#imgLogin").bind("click", function () {
                if (checkInput()) {
                    form1.submit();
                }
            });

        });

        function checkInput() {
            if (!validateFocus("txtUserName", "用户名", "NotEmpty", false)) {
                return false;
            }

            //            if (!validateFocus("txtVerifyCode", "验证码", "NotEmpty", false)) {
            //                return false;
            //            }

            return true;
        }

        function keyPress() {
            if (event.keyCode && event.keyCode == 13) {
                if (checkInput()) {
                    form1.submit();
                }
            }
        }

    </script>

</head>
<body onkeypress="keyPress()" scroll="no">
    @using (Html.BeginForm("Login", "Login", FormMethod.Post, new { id = "form1" }))
    {
        <div class="loginHeader">
        </div>
        <div class="loginBox">
            <div class="loginLeft">
                <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="./client/swflash.cab#version=9,0,28,0" width="345" height="268">
                    <param name="movie" value="@Url.Content("~/Content/images/Admin/login.swf")" />
                    <param name="quality" value="high" />
                    <param name="wmode" value="opaque" />
                    <embed src="@Url.Content("~/Content/images/Admin/login.swf")" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="345" height="268"></embed>
                </object>
            </div>
            <div class="loginBetween">
            </div>
            <div class="loginRight">
                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td height="268" align="center" valign="middle">
                            <table width="90%" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td width="30%" height="27" align="right">
                                        用户名：</td>
                                    <td width="82%" align="left">@Html.TextBox("txtUserName", ViewData["username"], new { @style = "width:150px;" })</td>
                                </tr>
                                <tr>
                                    <td height="27" align="right">
                                        密&nbsp;&nbsp;&nbsp;码：</td>
                                    <td align="left">
                                        @Html.Password("txtPassword", "", new { @style = "width:150px;" })</td>
                                </tr>
                                <tr>
                                    <td height="40" colspan="2" align="center" class="loginButton">
                                        <span><a href="#">
                                            <img  name="imgLogin"  id="imgLogin" src="@Url.Content("~/Content/images/Admin/btnn_login.gif")" /></a></span> </td>
                                </tr>
                                <tr>
                                    <td height="27" colspan="2" align="center" class="red">
                                        <div id="msg">
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
      
    }
</body>
@Html.Hidden("hdjsAlert", (ViewData["jsAlert"]));
</html>
